package com.ahcg

import scala.io.{Source, StdIn}

object Phone {

  def main(args: Array[String]): Unit = {
    checkPhone()
  }

  def checkPhone() {


    val phone = Source.fromFile("data/2020phonelocation.txt").getLines


    val phoneList: List[String] = phone.toList

    println(phoneList)
    var num: String = StdIn.readLine
    for (line <- phoneList; if line.contains(num)) {
      println(line)
    }
  }
}